package com.briup.cms.web.controller;

import com.briup.cms.domain.Role;
import com.briup.cms.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author shaoyb
 * @program: 221207-CMS
 * @description TODO
 * @create 2022/12/7 15:10
 **/
@RestController
@RequestMapping("/test")
public class TestController {
    @Autowired
    private IRoleService roleService;
    
    @GetMapping("/getAll")
    public List<Role> getAll() {
        List<Role> list = roleService.list();
        System.out.println(list.size());
        list.forEach(System.out::println);
        return list;
    }

}
